<template>
  <v-content style="bottom:0.50rem;background-color: #f5f5f5" v-vuet-scroll="{ path: 'home', name: 'content' }">
    <div class="mw-row-spacebetween-style" style="position:fixed;top:0;left:0;align-items:center;height:0.44rem;padding:0 0.15rem;align-items: center;width:3.45rem; background-color: #FFffff;">
      <div @click="skipToSearch" class="mw-active-rectangle-button " style="box-shadow:0px 0.04rem 0.1rem 0px rgba(234,234,234,0.53);border-radius:0.08rem;border:1px solid rgba(222,222,222,1);width:2.68rem;height:0.34rem;border-radius: 0.17rem;background-color:#ffffff;justify-content: flex-start">
        <img src="/static/search_icon.png" style="height:0.14rem;width:0.14rem;margin-right: 0.1rem"/>
        <div style="font-size:0.15rem;" class="mw-main-yellow ">好吃又好玩的奇葩商品</div>
      </div>
      <div @click="skipToSale" class="mw-column-center-style" style="margin-left: 0.18rem">
        <img src="/static/sale_icon.png" style="height:0.2rem;width:0.2rem;margin-bottom: 0.05rem"/>
        <div class="mw-first-text-color" style="font-size: 0.1rem">特惠</div>
      </div>
      <div @click="skipToArticle" class="mw-column-center-style" style="margin-left: 0.21rem">
        <img src="/static/article_icon.png" style="height:0.2rem;width:0.2rem;margin-bottom: 0.05rem"/>
        <div class="mw-first-text-color" style="font-size: 0.1rem">测评</div>
      </div>
    </div>
    <v-miaoScroll :on-refresh="data.onRefresh" :on-getmore="data.onGetmore" :has-next="data.has_next" :showview="data.showview" v-vuet-scroll="{ path: 'home', name: 'content' }" style="margin-top:0.44rem;">
      <div class="mw-column-center-style" style="width:3.55rem;margin-left: 0.1rem;">
        <div class="mw-row-spacebetween-style" style="width: 3.55rem;">
          <div class="mw-column-style">
            <div   v-for="(item,index) in data.list" v-if="index%2==0">
              <v-noteblockitem   :item="item" enter="home" ></v-noteblockitem>
            </div>
          </div>
          <div class="mw-column-style">
            <div  v-for="(item,index) in data.list" v-if="index%2==1">
              <v-noteblockitem   :item="item" enter="home"></v-noteblockitem>
            </div>
          </div>
        </div>

      </div>
    </v-miaoScroll>


  </v-content>

</template>

<script>
  import { mapModules, mapRules } from 'vuet'
  import utils from '../../utils'
  export default {
    mixins: [
      mapModules({ data: 'home'}),
      mapRules({store: [{ path: 'home' }],once: [{ path: 'home' }]})
    ],
    mounted(){
      this.data.needFetch = true
    },
    methods:{
//      skipToNote(id){
//        this.data.needFetch = false
//        this.$router.push({name: 'notedetail', query: {id: id}})
//      },
//      skipToUserPage(id){
//        this.data.needFetch = false
//        this.$router.push({name: 'userpage', query: {id: id}})
//      },
      skipToSearch(){
        this.data.needFetch = false
        this.$router.push({name: 'search'})
      },
      skipToSale(){
        this.data.needFetch = false
        this.$router.push({name: 'sale'})
      },
      skipToArticle(){
        this.data.needFetch = false
        this.$router.push({name: 'articlechannel', query: {id: 1}})
      },
    },
    data () {
      return {
      }
    }
  }
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style>


</style>
